package com.autologistics.dao;

import java.util.List;

import org.springframework.orm.hibernate3.HibernateTemplate;

import com.autologistics.model.Fororderid;

public class FororderidDaoImpl implements FororderidDao{
	HibernateTemplate hibTemplate;

	public HibernateTemplate getHibTemplate() {
		return hibTemplate;
	}

	public void setHibTemplate(HibernateTemplate hibTemplate) {
		this.hibTemplate = hibTemplate;
	}
	public int getNewOrderId(){
		Fororderid foi=new Fororderid();
		hibTemplate.save(foi);
		List<Fororderid> list = hibTemplate.find("from Fororderid");
		return list.size();
	}
}
